package com.hotel.app.service;

import com.hotel.app.config.OpenFeignConfig;
import com.hotel.common.param.RestPwd;
import com.hotel.app.config.OpenFeignConfig;
import com.hotel.common.param.UserAdd;
import com.hotel.common.param.UserLogin;
import com.hotel.common.vo.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;


@FeignClient(value = "ht-user-server", configuration = OpenFeignConfig.class)
public interface UserFeign {
    @RequestMapping("/user/register")
    R register(UserAdd userAdd);


    @RequestMapping("/user/loginpass")
    R loginpass(UserLogin userLogin);



    @RequestMapping("/user/logincode")
    R logincode(UserLogin userLogin);


    @RequestMapping("/user/reset")
    R reset(@RequestBody RestPwd restPwd);


    @RequestMapping(value = "/user/logout",method = RequestMethod.GET)
    R logout();

    @RequestMapping(value = "/user/info",method = RequestMethod.GET)
    R findUserInfoById();


}
